home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 44
/
Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso
/
-in_the_mag-
/
basics
/
amos
/
artcoder.lha
/
ArtCoder
/
AC.ReadMe
next >
Wrap
Text File
|
1996-01-12
|
6KB
|
165 lines
AMOS ART CODER © 1993,1996 Steve Tiffany -- Freeware
AMOS Art Coder is a program which simplifies the use
of the graphics commands Polygon, Polyline, Draw, Box
Bar, Ellipse, Paint, Palette, Set Pattern and Text.
It works like a paint program, but instead of saving
a picture as an IFF file, it writes an Ascii file in
RAM that contains the code to re-create the drawing.
You simply merge this code into your own program
where you want the picture to draw.
In light of AMOS's superior handling of bobs and IFF
files, why do you need something like this?
There are times when you can't use bobs and IFF files.
Say you're writing a short program for a magazine,and
people will be typing in the listing themselves. How
do you handle the bobs? Now your program can draw them
with art code and grab them with "Get Bob."
The other chief advantage of this approach is
compactness. Assuming a drawing of limited complexity,
the art code tends to be much smaller than an IFF file
of the same image. Say you've got a title screen
that's currently a 35k IFF file. Trace it with the Art
Coder and it may add 3k to your code, but you can get
rid of the IFF file, for a net savings of 32k. Or say
you're writing an adventure game. Using art code, your
program could have 150 very different background images
and still fit onto a single floppy disk.
Art Coder is also ideal for designing interface screens
because you can refer to the X,Y coordinates of Box
and Bar commands in your art code when you're writing
the routines that check for mouse clicks.
USING THE AMOS ART CODER
Run AMOS Pro or AMOS 1.3. Load and run ArtCoder.AMOS.
The first time you run the program you will be asked to
select a screen size and number of colors, then center
the screen and click the mouse. When a blank screen
and a control panel appear, select a graphics mode
(Polygon, Polyline, etc.), and a color. Draw your
picture, experimenting with different graphics modes
and colors. Note that the lines "rubber band" as long
as the left mouse button is held down. You can toggle
the control panel on or off with the F10 key. When you
finish the picture, select Quit.
IMPORTANT: Before merging your art code, look at the
information line at the top of the editor screen, where
it says "Free-" followed by a number. If the number is
less than 20,000, go to the Editor menu and select Set
Text Buffer. (In AMOS 1.3, use Alt-F9.) Increase the
number in the requester by at least 20,000. Setting
the number to 100,000 should give you plenty of room.
Click on Okay.
Now locate the cursor beneath the seventh line of the
program (under the comments) and merge the art code.
To do this in AMOS Professional, depress the Left
Amiga, Shift, and M keys. (In AMOS 1.3, use Shift-F5.)
At the file requester, double click on "ArtCode.asc".
The code to re-create your drawing will be inserted
into the program. Run the program again and watch it
draw your picture.
If you've drawn something you'd like to use in one of
your own programs, highlight the art code, store it,
then paste it into that program. Make sure the screen
dimensions are compatible.
The keyboard equivalents should be familiar to users of
DPaint. They are:
D Draw filled Polygon. There's a 15-side limit to
polygons, and a little counter appears near the
upper left corner to help you keep track. You can
tap the Space Bar to start a new polygon.
d Draw Polyline. Draw continuous lines as if you
were playing Connect-the-Dots. The Space Bar
starts a new polyline.
v Draw line segments.
r Rectangular box.
R Rectangular bar (filled).
f Fill with paint.
p Palette.
t Text.
Q Quit.
, Pick a color from the image, not the control
panel.
F10 Toggles control panel on and off.
When the Outline box has a check by it, Bars and
Polygons get drawn with an outline around them.
When the Pattern box has a check by it, Bars, Polygons
and Paint get drawn with a pattern. To turn the
pattern off, set it to zero. While the control bar is
in pattern select mode, clicking on the color boxes
changes the pattern color and leaves the main ink color
unaffected.
To create images that draw quickly, use mostly
polygons, polylines, segments, boxes and bars. Circles
and paint fills execute a lot more slowly.
To change screen dimensions, quit and run Art Coder
again with the Shift key held down.
Clever trick: you can add a "Load IFF" command where
the art code goes, and simply trace the picture. The
more realistic drawings in the sample slide show were
done this way. You may have to stop periodically to
merge in your code above the "Load IFF" command, and
write a note to yourself about what's been traced
already.
Sad development: OS 3.1 makes AMOS jump around like
crazy when you open an interlaced screen. So, even
though Art Coder can handle laced screens, you should
avoid them in the name of compatibility with the Amiga's
latest operating system.
Aesthetic advice: art code works best for large, bold
screens, not small detailed imagery. If you try to put
too much detail in, the routines take too long to draw
and you could even end up exceeding the size of the
same picture in IFF format! Think big and bold.
CALL FOR ARTISTS
I'd like to put together a slide show of images done in
Art Coder by different AMOS users, and upload it
to Aminet. If you'd like to participate, replace the
pictures in "SlideShow.AMOS" with some of your own and
send it to me either on an 880K floppy disk or UUencoded.
Images should be 352x240, 32 colors. If there's a big
response, I'd like to make it unarchive to exactly fill
a floppy disk. If the pictures have the same complexity
as the ones in the enclosed slide show, about 150 would
fit on an 880K floppy, once the program's compiled. Be
sure to send your slide show as source code.
Steve Tiffany
3255 14th Ave. So. #4 -or- stiffany@isd.net
Minneapolis, MN 55407
USA (addresses current January 96)